﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Objects
{
    public class ParseInjector : Valuehost
    {
        public string StringValue;
        public override object Value
        {
            get
            {
                return StringValue;
            }
            set
            {
                StringValue = (value != null) ? value.ToString() : null;
            }
        }
        public ParseInjector(string Value)
            : this()
        {
            this.StringValue = Value;
        }
        protected ParseInjector() { }
        protected override void Clone(ref Valuehost chain)
        {
            ParseInjector res;
            chain = res = (chain as ParseInjector) ?? new ParseInjector();
            res.StringValue = StringValue;
        }
    }

    public class ValidInjector : Valuehost
    {
        public Validator ValidValue;
        public override object Value
        {
            get
            {
                return ValidValue;
            }
            set
            {
                ValidValue = value as Validator;
            }
        }
        public ValidInjector(Validator Value)
            : this()
        {
            this.ValidValue = Value;
        }
        protected ValidInjector() { }
        protected override void Clone(ref Valuehost chain)
        {
            ValidInjector res;
            chain = res = (chain as ValidInjector) ?? new ValidInjector();
            res.ValidValue = ValidValue;
        }
    }
}
